/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.qframe.client.test.duptest;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import org.qframe.client.test.AbstractHandlerTest;
import org.qframe.quickc.annotations.QHandler;

/**
 *
 * @author gprasad
 */
@QHandler(id = "dupq1", path = "test/duptest/ql1.html")
public class QL1Handler extends AbstractHandlerTest {

    @Override
    protected void onQuickletLoad() {

        Button alertBut = new Button(getRenderedSlot().getRenderedSlotId());
        getRenderedQuicklet().getHtmlPanel().addToLocal(alertBut, "alertBut");
        alertBut.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                Window.alert(" Button in dupq1 clicked "+getRenderedQuicklet().getHtmlPanel().getElement().getInnerHTML());
            }
        });
    }
}
